package com.c611.smartclassroom.service.Impl;

import com.c611.smartclassroom.mapper.DeviceMessageMapper;
import com.c611.smartclassroom.model.DeviceMessage;
import com.c611.smartclassroom.model.DeviceMessageExample;
import com.c611.smartclassroom.service.DeviceMessageSevice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class DeviceMessageSeviceImql implements DeviceMessageSevice {

    @SuppressWarnings("SpringJavaInjectionPointsAutowiringInspection")
    @Autowired
    DeviceMessageMapper deviceMessageMapper;

    @Override
    public List<DeviceMessage> queryDeviceMessage(Integer deviceID) {
        DeviceMessageExample deviceMessageExample = new DeviceMessageExample();
        deviceMessageExample.createCriteria().andDeviceidIsNotNull();

        return deviceMessageMapper.selectByExample(deviceMessageExample);
    }
}
